package org.gateway;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.EurekaClient;

@SpringBootApplication
//@EnableZuulProxy
@EnableEurekaClient
@RestController
@EnableDiscoveryClient
@EnableFeignClients
//@ComponentScan(basePackageClasses=GatewayApp.class)
public class GatewayApp {
	
	@Autowired
	private EurekaClient eurekaClient;
	
	public static void main(String[] args) {
		SpringApplication.run(GatewayApp.class, args);
	}
	
	/*@GetMapping("/test")
	 public String test() {
		InstanceInfo instanceInfo = eurekaClient.getNextServerFromEureka("erueka-client", false);
        return instanceInfo.get;
    }*/
}
